From ced37d32aa345fc288483716771422e7b7c0913a Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Wed, 19 Jun 2024 17:10:24 +0700
Subject: <iman> update tampilan promotion program

---
 src/pages/shop/promo/[slug].tsx | 29 +++++++++++++----------------
 1 file changed, 13 insertions(+), 16 deletions(-)

(limited to 'src/pages/shop/promo/[slug].tsx')

diff --git a/src/pages/shop/promo/[slug].tsx b/src/pages/shop/promo/[slug].tsx
index 6e18101f..7fea10ff 100644
--- a/src/pages/shop/promo/[slug].tsx
+++ b/src/pages/shop/promo/[slug].tsx
@@ -14,7 +14,7 @@ import DesktopView from '../../../core/components/views/DesktopView';
 import MobileView from '../../../core/components/views/MobileView';
 import 'swiper/swiper-bundle.css';
 import useDevice from '../../../core/hooks/useDevice'
-import ProductFilterDesktop from '../../../lib/product/components/ProductFilterDesktop';
+import ProductFilterDesktop from '../../../lib/product/components/ProductFilterDesktopPromotion';
 import ProductFilter from '../../../lib/product/components/ProductFilter';
 import { HStack, Image, Tag, TagCloseButton, TagLabel } from '@chakra-ui/react';
 import { formatCurrency } from '../../../core/utils/formatValue';
@@ -369,19 +369,17 @@ export default function PromoDetail() {
 
       </MobileView>
       <DesktopView>
-        <div className='container mx-auto flex mb-3'>
-          <div className='w-3/12'>
-          <ProductFilterDesktop
-                  brands={brands || []}
-                  categories={categories || []}  
-                  prefixUrl={'/shop/promo'}
-                  defaultBrand={null}
-                />
-                <div className='h-6' />
-                <SideBanner />
-          </div>
-          <div className='w-9/12 pl-6'>
+        <div className='container mx-auto flex mb-3 flex-col'>
+          <div className='w-full pl-6'>
             <h1 className='text-2xl mb-2 font-semibold'>Promo {whatPromo}</h1>
+              <div className=' w-full'>
+                <ProductFilterDesktop
+                      brands={brands || []}
+                      categories={categories || []}  
+                      prefixUrl={'/shop/promo'}
+                      // defaultBrand={null}
+                    />
+                </div>
               <FilterChoicesComponent
                 brandValues={brandValues}
                 categoryValues={categoryValues}
@@ -395,9 +393,9 @@ export default function PromoDetail() {
                 </div>
               ) : promoData && promoItems.length >= 1 ? (
                 <>
-                <div className='grid grid-cols-1 gap-x-20 gap-y-1 lg:gap-x-14  xl:gap-x-36 lg:grid-cols-2 '>
+                <div className='grid grid-cols-1 gap-x-6  sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-2 xl:grid-cols-3'>
                   {visiblePromotions?.map((promotion) => (
-                    <div key={promotion.id} className="min-w-[400px] max-w-[400px]  mb-[20px] sm:w-full md:w-1/2 lg:w-1/3 xl:w-1/4 ">
+                    <div key={promotion.id} className="min-w-[400px] max-w-[400px]  mb-[20px] sm:min-w-[350px] md:min-w-[380px] lg:min-w-[400px] xl:min-w-[400px] ">
                       <ProductPromoCard promotion={promotion}/>
                     </div>
                   ))}
@@ -488,7 +486,6 @@ const FilterChoicesComponent = ({
             />
         </Tag>
       ))}
-      {console.log("categoryValues",categoryValues)}
       {priceFrom && priceTo && (
         <Tag size='lg' borderRadius='lg' variant='outline' colorScheme='gray'>
           <TagLabel>
-- 
cgit v1.2.3

